Implement SMIL snapshot rendering#534
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab25317741
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f033c1005e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 597b85cd87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21cdda7536
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
This PR implements the SMIL Snapshot Rendering lane for static SVG animation snapshots. It moves the animation runtime beyond time-zero rendering by evaluating configured snapshot times, composing active animation intervals, routing animated values through the same style/resource paths used by static rendering, and refreshing W3C Chrome-backed baselines for the enabled animation rows.
The work is split into three commits:
bcc4ede3eimplements the SMIL animation runtime behavior.bcd3aad78hardens renderer/resource parity needed by animated snapshots.ab2531774refreshes the W3C SMIL snapshot harness, baselines, and roadmap.What Changed
SMIL animation runtime
repeat(n)eventbase timing, self-sync recurrence, future syncbase start-time queries, restart truncation, finitemaxhandling for indefinite intervals, and half-open active interval boundaries.currentColor, andinherit.animateMotionplusanimateTransform, including additive and non-additive combinations.currentColor,inherit, and resource references survive until runtime resolution.href,xlink:href,xml:*, style, class, presentation attributes, and custom attributes.Rendering and resource parity
currentColor, and local paint references resolve against the animated clone instead of the source document.useclip paths and marker suppression in temporary marker compilation.clip: rect(...)parsing, including whitespace syntax,auto,px, and legacy comma-offset behavior.W3C harness and baselines
W3CTestSuiteTests, wait for a real iframe document, use an explicit capture-ready marker, avoid duplicate readiness callbacks, and simulate the pre-seek interaction needed byanimate-elem-52-t.animate-pservers-grad-01-b, and refreshesfilters-composite-05-f.Remaining Explicit Policy Skips
The remaining skipped SMIL rows are not hidden failures in enabled coverage:
animateColorrows where modern Chrome captures the fixture as a no-op and the suite needs a non-Chrome static reference policy before enabling.animate-elem-90-bandanimate-elem-91-t, where partial routing is covered but full selector guide-fill or display/use/resource parity remains broader than the static snapshot lane.Validation
Ran the required local validation after implementation:
dotnet format Svg.Skia.slnx --no-restorenode --check scripts/capture_w3c_chrome_overrides.mjsgit diff --checkdotnet build Svg.Skia.slnx -c Release --no-restoredotnet test tests/Svg.Skia.UnitTests/Svg.Skia.UnitTests.csproj -f net10.0 -c Release --no-restore --filter "FullyQualifiedName~SvgAnimationControllerTests"dotnet test tests/Svg.Skia.UnitTests/Svg.Skia.UnitTests.csproj -f net10.0 -c Release --no-restore --filter "DisplayName~animate-"dotnet test Svg.Skia.slnx -c Release --no-restoreResults:
SvgAnimationControllerTests: 72 passed.Svg.Skia.UnitTestswith 2122 passed and 68 explicit skips; all other project test assemblies passed.Notes
externals/SVGwas checked after formatting. Accidental submodule formatting churn was reverted, and the submodule is clean.